home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util3 / idefix.lha / Install < prev    next >
Text File  |  1995-08-23  |  29KB  |  1,051 lines

  1. ;$VER: IDEfix Install 46.2 (23.08.95)
  2. ;Copyright ©1993/1994/1995 Elaborate Bytes, Oliver Kastl
  3.  
  4. ( set #ControlDefault 1 )
  5.  
  6. (onerror
  7.     (makeassign "CacheCDFSInst" (safe))
  8.     (makeassign "CacheCDFS" (safe))
  9. )
  10.  
  11. (set #autoMount 1)
  12. (set #CDDevice_NC "CD0" )
  13. (set #instEjectCD 1)
  14. (set #ReplaceOld 1 )
  15. (set #DeleteOld 1 )
  16.  
  17. (set #wbversion (getversion "libs:version.library"))
  18. (set #wbversion (/ #wbversion 65536) )
  19.  
  20. (complete 0)
  21.  
  22. (if (< #wbversion 37)
  23.     (abort "\n\nAmigaDOS 2.04 or higher is required for CacheCDFS! "
  24.              "\n\nAn upgrade will be needed for your Amiga." )
  25. )
  26.  
  27.  
  28. (if (< (getdiskspace "SYS:") 61440)
  29.     (abort "\n\nApproximately 60K of disk space is needed on your SYS: volume."
  30.              "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)    "K free.\n\n"
  31.              "Delete or transfer some files from the SYS: volume and try again." )
  32. )
  33.  
  34. (makeassign "CacheCDFSInst" "" ( safe) )
  35.  
  36.  
  37. (set #theirlevel @user-level )
  38.  
  39. (set #Match ( run "CacheCDFSInst:CheckIDEfix" ( safe ) ) )
  40.  
  41. (user 2)
  42.  
  43. (message "\nWelcome to IDE-fix, CacheCDFS2, CD32-Emulator and PlayCD!"
  44.             "\n\nIMPORTANT: The name \"IDE-fix\" must be printed on your original disk!" 
  45.          "\n\nIf you bought this program and \"IDE-fix\" is NOT printed "
  46.          "directly on the disk (e.g., the disk has a sticker or no label at all) "
  47.          "you are using a pirated copy!"
  48.          "\n\nIn this case please contact us immediately and tell us where you bought it! "
  49.          "Thank you!" )
  50.  
  51.  
  52. (set #DefaultDir (tackon @default-dest "IDEfix"))
  53.  
  54. (set #CDFSDir
  55.     (askdir
  56.         (prompt "\n\nSpecify the directory in which the support programs will be placed:" )
  57.         (help "\n\nIDE-fix and CacheCDFS contain a number of support programs. "
  58.         "This directory will specifiy where the programs will be placed. "
  59.         "If you need, create a separate directory for the files.")
  60.         (default #DefaultDir)
  61.         (newpath)
  62.     )
  63. )
  64.  
  65. (user #theirlevel)
  66.  
  67. (if (NOT (exists #CDFSDir ))
  68.     (
  69.     (makedir #CDFSDir
  70.         (safe)
  71.         (infos)
  72.     )
  73.     )
  74. )
  75.  
  76.  
  77. (set @default-dest #CDFSDir)
  78.  
  79.  
  80. (makeassign "CacheCDFS" #CDFSDir (safe))
  81.  
  82. (if (= #Match 0)
  83.     (
  84.     (copylib
  85.         (prompt "This will copy the IDEfix program to your C: directory.")
  86.         (help "This will copy the IDEfix program to your C: directory.")
  87.         (source "CacheCDFSInst:C/IDEfix")
  88.         (confirm)
  89.         (dest "C:")
  90.     )
  91.     (copylib
  92.         (prompt "This will copy the LoadIDE program to your C: directory.")
  93.         (help "This will copy the LoadIDE program to your C: directory.")
  94.         (source "CacheCDFSInst:C/LoadIDE")
  95.         (confirm)
  96.         (dest "C:")
  97.     )
  98.  
  99.     (copylib
  100.         (prompt "This will copy the MountIDE program to your C: directory.")
  101.         (help "This will copy the MountIDE program to your C: directory.")
  102.         (source "CacheCDFSInst:C/MountIDE")
  103.         (confirm)
  104.         (dest "C:")
  105.     )
  106.  
  107.     (copylib
  108.         (prompt "This will copy the Ship program to your C: directory.")
  109.         (help "This will copy the Ship program to your C: directory.")
  110.         (source "CacheCDFSInst:C/Ship")
  111.         (confirm)
  112.         (dest "C:")
  113.     )
  114.  
  115.     (copylib
  116.         (prompt "This will copy the AutoPark program to your C: directory.")
  117.         (help "This will copy the AutoPark program to your C: directory.")
  118.         (source "CacheCDFSInst:C/AutoPark")
  119.         (confirm)
  120.         (dest "C:")
  121.     )
  122.  
  123.  
  124.     (copyfiles
  125.         (prompt "This will copy Icons for the Ship, Autopark and MountIDE programs "
  126.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  127.             "SYS:WBStartUp drawer.")
  128.         (help "This will copy Icons for the Ship, Autopark and MountIDE programs "
  129.             "to your Harddisk. You can copy these Icons wherever you like, e.g. in your "
  130.             "SYS:WBStartUp drawer.")
  131.         (source "CacheCDFSInst:Harddisk")
  132.         (infos)
  133.         (all)
  134.         (confirm)
  135.         (dest "CacheCDFS:Harddisk")
  136.     )
  137.     
  138.  
  139.     (user 2)
  140.  
  141.     (message "IDEfix, LoadIDE, MountIDE, AutoPark and Ship are installed in your C: "
  142.              "directory. You must start IDEfix manually, as this program "
  143.              "will NOT alter your startup-sequence! "
  144.              "\n\nEnter \"IDEfix\" or \"LoadIDE reset\" behind SetPatch in your startup-sequence "
  145.              "to use IDEfix! "
  146.              "\n\nUse \"Ship <unit>\" from the CLI to park your harddisk!"
  147.              "\nUse \"MountIDE force\" from the CLI to mount additional SyQuest cartridges!"
  148.              "\n\nClick PROCEED to install CacheCDFS and/or ATAPI. Click ABORT to quit.")
  149.  
  150.     )
  151. )
  152.  
  153. (user 2)
  154.  
  155. (message "\n\nNow the FindCD program will be launched to find "
  156.          "the Device and Unit of your CD-Rom..."
  157.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  158.          "\n\nChoose the device and unit and click \"USE\"!"
  159.          "\n\nIf FindCD hangs: Reboot, start the installation again and "
  160.          "click CANCEL within FindCD!")
  161.  
  162. (working "\n\nLaunching the FindCD program to find "
  163.          "the Device and Unit of your CD-Rom..."
  164.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  165.          "\n\nChoose the device and unit and click \"USE\"!"
  166.          "\n\nIf FindCD hangs: Reboot, start the installation again and "
  167.          "click CANCEL within FindCD!")
  168.  
  169. (set #Product ( run "CacheCDFSInst:FindCD PATH=CacheCDFSInst:Devs add" ( safe ) ) )
  170.  
  171.  
  172. (if ( NOT (= #Product 0) )
  173.     (
  174.     (set #CDROM_Device
  175.         (askstring
  176.             (prompt "\n\nWhat is the name for the exec device driver? " )
  177.             (default "scsi.device" )
  178.             (help "\n\nThis is the name of the device driver to use. "
  179.                     "The name is different for different configurations. "
  180.                     "\n\nConsult the manual of your SCSI/CD-Rom host adapter "
  181.                     "if you don't know the name!" )
  182.         )
  183.     )
  184.  
  185.     (set #CDROM_Unit
  186.         (asknumber
  187.             (prompt "\n\nWhat is the Unit number of your CD-Rom drive?" )
  188.             (default 5 )
  189.             (help "\n\nThis is the unit # of the CD-Rom drive.  This is usually a "
  190.                     "numerical value between 0 and 7." )
  191.         )
  192.     )
  193.     )
  194. )
  195.  
  196. (if (= #Product 0 )
  197.     (
  198.     ( set #CDROM_Device (getenv "CDROM_Device" ))
  199.     ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  200.     )
  201. )
  202.  
  203. ( set #SourcePath (tackon "CacheCDFSInst:devs" #CDROM_Device))
  204.  
  205. (user #theirlevel)
  206.  
  207. (if (exists #SourcePath )
  208.     (
  209.     (copylib
  210.         (prompt "This will copy the " #CDROM_Device " to your DEVS: directory.")
  211.         (help "This will copy the " #CDROM_Device " to your DEVS: directory.")
  212.         (source #SourcePath)
  213.         (confirm)
  214.         (dest "DEVS:")
  215.     )
  216.     )
  217. )
  218.  
  219.  
  220. (set #DevFlags 0)
  221.  
  222. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandemat#?|#?atapi#?)" ( safe ) ) )
  223.  
  224. (if (= #Match 0)
  225.     (
  226.     (copylib
  227.         (prompt "This will copy the SetAtapiSpeed program to your C: directory.")
  228.         (help "This will copy the SetAtapiSpeed program to your C: directory.")
  229.         (source "CacheCDFSInst:C/SetAtapiSpeed")
  230.         (confirm)
  231.         (dest "C:")
  232.     )
  233.     (set #DevFlags 1)
  234.     )
  235. )
  236.  
  237. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(tandem#?|#?atapi#?|oktagon#?)" ( safe ) ) )
  238.  
  239. (if (= #Match 0)
  240.     ((set #ControlDefault 2))
  241. )
  242.  
  243. (set #Match ( run "CacheCDFSInst:MatchPattern NAME="#CDROM_Device" PATTERN=(scsi.#?|???.scsi.#?)" ( safe ) ) )
  244.  
  245. (if (= #Match 0)
  246.     ((set #ControlDefault 5))
  247. )
  248.  
  249. (if (= #CDROM_Device "gvpscsi.device")
  250.     ((set #ControlDefault 8))
  251. )
  252.  
  253.  
  254. (complete 20 )
  255.  
  256. (user 2)
  257.  
  258. (set #ControlMask 
  259.     (askoptions
  260.         (prompt "FileSystem -> Controller Configuration")
  261.         (choices "Use SCSI Direct" 
  262.                     "Use Diskchange Interrupt"
  263.                     "Use 24 Bit-DMA"
  264.                     "Use Motor off" )
  265.         (help    "Here You may define the behaviour of the CacheCDFS accessing the " 
  266.               #CDROM_Device ". If you are "
  267.                 "not sure what option is correct, leave the default settings as they "
  268.                 "are. They should work in most cases.\n"
  269.                 "These options may later be altered using the CDFSprefs program. "
  270.                 "However, wrong settings may lead to crashes if you mount the "
  271.                 "FileSystem!\n"
  272.                 "IF YOU HAVE A TANDEMCD / CD1200: YOU MUST DISABLE \"USE SCSI DIRECT\"!\n\n"
  273.  
  274.                 "\"Use SCSI Direct\"\n"
  275.                 "Choose this option if the SCSI controller using "
  276.                 #CDROM_Device " cannot handle DoIO reads with 2048 bytes sectorsize "
  277.                 "correctly (e.g. ALFII, controllers from Progressive Peripherals, Emplant).\n"
  278.                 "Do NOT choose this option if your controller is a modern, well designed "
  279.                 "SCSI controller (ALFIII, Oktagon, A2091, A3000, A4091) or if it is "
  280.                 "NO SCSI controller at all (TandemCD)!\n\n"
  281.  
  282.                 "\"Use Diskchange Interrupt\"\n"
  283.                 "Choose this option if the controller using "
  284.                 #CDROM_Device " does properly handle TD_ADDCHANGEINT and TD_REMCHANGEINT. "
  285.                 "All modern controllers should do this (ALFIII, Oktagon, TandemCD, "
  286.                 "GVP Series-II)\n"
  287.                 "Do NOT choose this option if your controller has problems with diskchange "
  288.                 "Interrupts (old ROM versions of A2091, A3000, A4091, controllers from "
  289.                 "Progressive Peripherals, Emplant)\n\n"
  290.  
  291.                 "\"Use 24 Bit-DMA\"\n"
  292.                 "Choose this option if the SCSI or CD controller using "
  293.                 #CDROM_Device " is a 24-Bit (Zorro II) DMA device "
  294.                 "(e.g. A2091 from Commodore).\n"
  295.                 "Do NOT choose this option if your controller is a 32-Bit "
  296.                 "(Zorro III) device (e.g. FastLane, A3000, A4091), or a non-DMA controller "
  297.                 "like the majority of controllers (e.g. ALFII/III, Oktagon, "
  298.                 "TandemCD, Golem, IVS TrumpCard, Supra) as it will lead to "
  299.                 "decreased performance!\n\n"
  300.  
  301.                 "\"Use Motor off\"\n"
  302.                 "Choose this option if the SCSI controller using "
  303.                 #CDROM_Device " is a GVP controller with \"Faaast\" roms.\n"
  304.                 "Do NOT choose this option if your controller is anything else."
  305.             )
  306.         (default #ControlDefault)
  307.     )
  308. )
  309.  
  310. (set #BufMemType  "1 /* MEMF_PUBLIC */\n" )
  311. (set #BufMemInt  1 )
  312.  
  313. (if (IN #ControlMask 2)
  314.     (
  315.     (set #BufMemType  "513 /* MEMF_PUBLIC|MEMF_24BITDMA */\n")
  316.     (set #BufMemInt  513 )
  317.     )
  318. )
  319.  
  320. (set #Control "\"MD=0 LC=1 DC=8 L LV AL LFC=1")
  321.  
  322.  
  323. (if (IN #ControlMask 0)
  324.     (
  325.     (set #Control (cat #Control " S"))
  326.     )
  327. )
  328.  
  329. (if (NOT (IN #ControlMask 1))
  330.     (
  331.     (set #Control (cat #Control " NC"))
  332.     )
  333. )
  334.  
  335. (if (IN #ControlMask 3)
  336.     (
  337.     (set #Control (cat #Control " M"))
  338.     )
  339. )
  340.  
  341.  
  342. (set #Control (cat #Control "\"\n"))
  343.  
  344.  
  345. (set #autoMount
  346.     (askbool
  347.         (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?\n\n"
  348.                 "NOTE: If you are unsure if your controller will work correctly with "
  349.                 "the controller settings, you should select \"NO\"!" )
  350.         (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount CacheCDFS.")
  351.         (default 1)
  352.     )
  353. )
  354.  
  355.  
  356. (if #autoMount
  357.     (set #mountDirectory "DEVS:DOSDrivers")
  358. )
  359.  
  360. (if (not #autoMount)
  361.     (set #mountDirectory "SYS:Storage/DOSDrivers")
  362. )
  363.  
  364. (set #CDDevice_NC
  365.     (askstring
  366.         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n"
  367.         "(The trailing colon MUST NOT be present)" 
  368.         )
  369.         (default #CDDevice_NC )
  370.         (help "\n\nThis is the name under which AmigaDOS will reference the "
  371.                 "CD-Rom as.  While usually "
  372.                 #CDDevice_NC
  373.                 ", it can be any name you choose. "
  374.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  375.     )
  376. )
  377.  
  378.  
  379. (set #CDDevice (cat #CDDevice_NC ":") )
  380.  
  381.  
  382. (user #theirlevel)
  383.  
  384. (if (exists "CacheCDFSInst:C/Mount")
  385.     (
  386.     (copylib
  387.         (source "CacheCDFSInst:C/Mount")
  388.         (dest "C:")
  389.     ))
  390. )
  391.  
  392. (protect "l:CacheCDFS" "rwed" )
  393. (copylib
  394.     (prompt "\n\nCopying CDROM FileSystem to the l: directory.\n" )
  395.     (source "CacheCDFSInst:l/CacheCDFS")
  396.     (dest "l:")
  397.     (confirm)
  398.     (help "\n\nThis will copy over the CDROM FileSystem program to your "
  399.         "l: directory\n\nThis is an essential step in the installation "
  400.         "process." )
  401. )
  402.  
  403.  
  404. (if (exists "L:TandemCacheCDFS" )
  405.     (
  406.     ((set #DeleteOld
  407.         (askbool
  408.         (prompt "\n\n\"L:TandemCacheCDFS\" is present from an earlier installation."
  409.                 "\n\nDelete \"L:TandemCacheCDFS\" ?" )
  410.         (help "\n\nClick \"YES\" if \"L:TandemCacheCDFS\" should be "
  411.               "deleted and \"NO\" if not!")
  412.         (default 1)
  413.         )
  414.     ))
  415.  
  416.     (if #DeleteOld
  417.     ((protect "L:TandemCacheCDFS" "rwed" )
  418.     (delete "L:TandemCacheCDFS" )
  419.     ))
  420. ))
  421.  
  422. (if (exists "L:DemoCacheCDFS" )
  423.     (
  424.     ((set #DeleteOld
  425.         (askbool
  426.         (prompt "\n\n\"L:DemoCacheCDFS\" is present from an earlier installation."
  427.                 "\n\nDelete \"L:DemoCacheCDFS\" ?" )
  428.         (help "\n\nClick \"YES\" if \"L:DemoCacheCDFS\" should be "
  429.               "deleted and \"NO\" if not!")
  430.         (default 1)
  431.         )
  432.     ))
  433.  
  434.     (if #DeleteOld
  435.     ((protect "L:DemoCacheCDFS" "rwed" )
  436.     (delete "L:DemoCacheCDFS" )
  437.     ))
  438. ))
  439.  
  440. (complete 30 )
  441.  
  442.  
  443. (if (< #wbversion 38)
  444.     ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
  445.     (if #autoMount
  446.         ((protect "S:User-Sequence" "srwed" )
  447.  
  448.         (startup "CacheCDFS"
  449.             (command #startupCommand )
  450.             (prompt "\n\nInserting MOUNT command into the startup-sequence")
  451.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
  452.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
  453.                     "automatically start CacheCDFS upon bootup." )
  454.         ))
  455.     )
  456.     (if (not #autoMount)
  457.         ((protect "S:User-Sequence" "srwed" )
  458.  
  459.         (startup "CacheCDFS"
  460.             (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  461.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  462.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file because you didn't "
  463.                     "want to automatically start CacheCDFS upon bootup." )
  464.         ))
  465.     )
  466.  
  467.     (if (exists (cat "devs:MountList." #CDDevice_NC ) )
  468.         ((set #ReplaceOld
  469.             (askbool
  470.             (prompt "\n\nDEVS:MountList." #CDDevice_NC" already exists!\n\n"
  471.                     "Do you want to replace it?" )
  472.             (help "\n\nClick \"YES\" if DEVS:MountList."#CDDevice_NC" should be "
  473.                   "replaced and \"NO\" if not!")
  474.             (default 1)
  475.             )
  476.         ))
  477.     )
  478.  
  479.     (if #ReplaceOld
  480.  
  481.     ((protect (cat "devs:MountList." #CDDevice_NC) "rwed" )
  482.  
  483.     (textfile
  484.         (dest (cat "devs:MountList." #CDDevice_NC) )
  485.         (append "/***************************************************************/\n"
  486.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  487.                   "/***************************************************************/\n")
  488.         (append #CDDevice "\n")
  489.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  490.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  491.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  492.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  493.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  494.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  495.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  496.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  497.         (append "    Reserved       = 0 /* Unused */\n")
  498.         (append "    Interleave     = 0 /* Unused */\n")
  499.         (append "    LowCyl         = 0 /* Unused */\n")
  500.         (append "    HighCyl        = 0 /* Unused */\n")
  501.         (append "    Surfaces       = 1 /* Unused */\n")
  502.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  503.         (append "    BufMemType     = " #BufMemType )
  504.         (append "    GlobVec        = -1 /* Do not change! */\n")
  505.         (append "    Mount          = 1 /* Mount it immediately */\n")
  506.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  507.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  508.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  509.         (append "    Control        = "#Control)
  510.         (append "   /* The Control field is for special adjustments */\n")
  511.         (append "   /* L/S convert all file names to lowercase */\n")
  512.         (append "   /* LV/S convert volume names to lowercase */\n")
  513.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  514.         (append "   /* LFC/N start converting at this character */\n")
  515.         (append "   /* LC/N/A number of blocks per cache line */\n")
  516.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  517.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  518.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  519.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  520.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  521.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  522.         (append "#\n")
  523.     )
  524.     (protect (cat "devs:MountList." #CDDevice_NC) "-e" )
  525.     )
  526.     )
  527. ))
  528.  
  529.  
  530.  
  531. (if (> #wbversion 37)
  532.     (
  533.     (if (exists "CacheCDFSInst:C/SetPatch")
  534.         (
  535.         (copylib
  536.                 (source "CacheCDFSInst:C/SetPatch")
  537.                 (dest "C:")
  538.         ))
  539.     )
  540.  
  541.     (if (exists (tackon #mountDirectory #CDDevice_NC ) )
  542.         ((set #ReplaceOld
  543.             (askbool
  544.             (prompt "\n\n" (tackon #mountDirectory #CDDevice_NC) " already exists!\n\n"
  545.                     "Do you want to replace it?" )
  546.             (help "\n\nClick \"YES\" if " (tackon #mountDirectory #CDDevice_NC) " should be "
  547.                   "replaced and \"NO\" if not!")
  548.             (default 1)
  549.             )
  550.         ))
  551.     )
  552.  
  553.     (if #ReplaceOld
  554.  
  555.     ((protect (tackon #mountDirectory #CDDevice_NC) "rwed" )
  556.  
  557.     (textfile
  558.         (dest (tackon #mountDirectory #CDDevice_NC) )
  559.         (append "/***************************************************************/\n"
  560.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  561.                   "/***************************************************************/\n")
  562.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  563.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  564.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  565.         (append "    Flags          = " #DevFlags " /* OpenDevice flags */\n")
  566.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  567.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  568.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  569.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  570.         (append "    Reserved       = 0 /* Unused */\n")
  571.         (append "    Interleave     = 0 /* Unused */\n")
  572.         (append "    LowCyl         = 0 /* Unused */\n")
  573.         (append "    HighCyl        = 0 /* Unused */\n")
  574.         (append "    Surfaces       = 1 /* Unused */\n")
  575.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  576.         (append "    BufMemType     = " #BufMemType )
  577.         (append "    GlobVec        = -1 /* Do not change! */\n")
  578.         (append "    Mount          = 1 /* Mount it immediately */\n")
  579.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  580.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  581.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  582.         (append "    Control        = "#Control)
  583.         (append "   /* The Control field is for special adjustments */\n")
  584.         (append "   /* L/S convert all file/volume names to lowercase */\n")
  585.         (append "   /* LV/S convert volume names to lowercase */\n")
  586.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  587.         (append "   /* LFC/N start converting at this character */\n")
  588.         (append "   /* LC/N/A number of blocks per cache line */\n")
  589.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  590.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  591.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  592.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  593.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  594.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  595.     )
  596.  
  597.     (protect (tackon #mountDirectory #CDDevice_NC) "-e" )
  598.  
  599.     (copyfiles
  600.             (prompt "\n\nCopying Mountlist icon")
  601.             (source "CacheCDFSInst:Devs/DOSDrivers/CD0.info")
  602.             (dest #mountDirectory)
  603.             (newname (cat #CDDevice_NC ".info"))
  604.             (help "\n\nThis will copy over an icon for the mountlist file.")
  605.             (confirm)
  606.  
  607.     ))
  608.     )
  609.  
  610.     (protect "S:User-Sequence" "srwed" )
  611.     (startup "CacheCDFS"
  612.         (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  613.         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  614.                 "\"S:Startup-Sequence\" or \"S:User-Startup\" file if it is present from "
  615.                 "an earlier installation." )
  616.         )
  617.  
  618.     (if ( exists ( cat "devs:MountList." #CDDevice_NC ) )
  619.  
  620.         ((protect (cat "devs:MountList." #CDDevice_NC) "rwed " )
  621.         (delete (cat "devs:MountList." #CDDevice_NC)
  622.             (prompt "\n\nDeleting file \"DEVS:MOUNTLIST." #CDDevice_NC "\"" )
  623.             (help "\n\nThe file \"DEVS:MOUNTLIST." #CDDevice_NC "\" will be deleted "
  624.                     "if it is present from an earlier installation." )
  625.             (confirm)
  626.             )
  627.         ))
  628.     )
  629. )
  630.  
  631.  
  632. (complete 40 )
  633.  
  634. (set #instCDFSprefs
  635.     (askbool
  636.         (prompt "\n\nShould the CDFSprefs utility be installed?")
  637.         (help "\n\nThis will copy over the CDFSprefs utility "
  638.                 "to your SYS:Prefs directory\n\nIf you do not "
  639.                 "wish the CDFSprefs program to be transferred to your system, "
  640.                 "skip this step.\n" )
  641.         (default 1)
  642.     )
  643. )
  644.  
  645. (if #instCDFSprefs
  646.     ((protect "CacheCDFS:CDFSprefs" "rwed" )
  647.     (protect "CacheCDFS:CDFSprefs.info" "rwed" )
  648.     (copylib
  649.         (prompt "\n\nCopying the CDFSprefs program to the "
  650.                   "SYS:Prefs directory." )
  651.         (source "CacheCDFSInst:CDFSprefs")
  652.         (dest "SYS:Prefs")
  653.         (infos)
  654.         (help "\n\nThis will copy over the CDFSprefs "
  655.                 "program to your SYS:Prefs directory\n\nIf you do not "
  656.                 "wish the CDFSprefs program to be transferred to your system, "
  657.                 "skip this step." )
  658.         (confirm)
  659.     )
  660.  
  661.     (tooltype
  662.         (dest "SYS:Prefs/CDFSprefs" )
  663.         (noposition)
  664.     )
  665. ))
  666.  
  667. (complete 60 )
  668.  
  669. (set #instKillDev
  670.     (askbool
  671.         (prompt "\n\nShould the KillDev utility be installed?")
  672.         (help "\n\nThis will copy over the KillDev utility "
  673.                 "to your CacheCDFS directory\n\nIf you do not "
  674.                 "wish the KillDev program to be transferred to your system, "
  675.                 "skip this step." )
  676.         (default 1)
  677.     )
  678. )
  679.  
  680. (if #instKillDev
  681.     ((protect "CacheCDFS:KillDev" "rwed" )
  682.     (protect "CacheCDFS:KillDev.info" "rwed" )
  683.     (copylib
  684.         (prompt "\n\nCopying the KillDev program to the "
  685.                   "CacheCDFS: directory.\n" )
  686.         (source "CacheCDFSInst:KillDev")
  687.         (dest "CacheCDFS:")
  688.         (infos)
  689.         (help "\n\nThis will copy over the KillDev "
  690.                 "program to your CacheCDFS: directory\n\nIf you do not "
  691.                 "wish the KillDev program to be transferred to your system, "
  692.                 "skip this step." )
  693.         (confirm)
  694.     )
  695.  
  696.     (tooltype
  697.         (dest "CacheCDFS:KillDev" )
  698.         (settooltype "DOSDEV" #CDDevice )
  699.         (noposition)
  700.     )
  701. ))
  702.  
  703. (set #instFindCD
  704.     (askbool
  705.         (prompt "\n\nShould the FindCD utility be installed?")
  706.         (help "\n\nThis will copy over the FindCD utility "
  707.                 "to your CacheCDFS directory\n\nIf you do not "
  708.                 "wish the FindCD program to be transferred to your system, "
  709.                 "skip this step." )
  710.         (default 1)
  711.     )
  712. )
  713.  
  714. (if #instFindCD
  715.     ((protect "CacheCDFS:FindCD" "rwed" )
  716.     (protect "CacheCDFS:FindCD.info" "rwed" )
  717.     (copylib
  718.         (prompt "\n\nCopying the FindCD program to the "
  719.                   "CacheCDFS: directory.\n" )
  720.         (source "CacheCDFSInst:FindCD")
  721.         (dest "CacheCDFS:")
  722.         (infos)
  723.         (help "\n\nThis will copy over the FindCD "
  724.                 "program to your CacheCDFS: directory\n\nIf you do not "
  725.                 "wish the FindCD program to be transferred to your system, "
  726.                 "skip this step." )
  727.         (confirm)
  728.     )
  729.  
  730.     (tooltype
  731.         (dest "CacheCDFS:FindCD" )
  732.         (noposition)
  733.     )
  734.  
  735. ))
  736.  
  737. (complete 70 )
  738.  
  739.  
  740. (if #instEjectCD
  741.     (
  742.     (set #instEjectCD
  743.     (askbool
  744.         (prompt "\n\nShould the EjectCD utility be installed?")
  745.         (help "\n\nThis will copy over the EjectCD utility "
  746.                 "to your CDFS directory\n\nIf you do not "
  747.                 "wish the EjectCD program to be transferred to your system, "
  748.                 "skip this step.\n" )
  749.         (default 1)
  750.     )
  751.     ))
  752. )
  753.  
  754. (if #instEjectCD
  755.     ((protect "CacheCDFS:EjectCD" "rwed" )
  756.     (protect "CacheCDFS:EjectCD.info" "rwed" )
  757.     (copylib
  758.         (prompt "\n\nCopying EjectCD program to the "
  759.                   "CacheCDFS: directory.\n" )
  760.         (source "CacheCDFSInst:EjectCD")
  761.         (dest "CacheCDFS:")
  762.         (help "\n\nThis will copy over the EjectCD utility "
  763.                 "to your CacheCDFS directory\n\nIf you do not "
  764.                 "wish the EjectCD program to be transferred to your system, "
  765.                 "skip this step.\n" )
  766.         (infos)
  767.         (confirm)
  768.     )
  769.  
  770.     (tooltype
  771.         (dest "CacheCDFS:EjectCD" )
  772.         (settooltype "DEVICE" #CDROM_Device )
  773.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  774.         (noposition)
  775.     )
  776. ))
  777.  
  778. (set #instPlayCD 0)
  779.  
  780. (if (exists "CacheCDFSInst:PlayCD.lha")
  781.  
  782. ((set #instPlayCD
  783.     (askbool
  784.         (prompt "\n\nShould the PlayCD Audio Player be installed?")
  785.         (help "\n\nThis will copy over the PlayCD drawer "
  786.                 "to your CacheCDFS directory\n\nIf you do not "
  787.                 "wish the PlayCD drawer to be transferred to your system, "
  788.                 "skip this step." )
  789.         (default 1)
  790.     )
  791. )))
  792.  
  793. (if #instPlayCD
  794.     (
  795.  
  796.     (working "\n\nDecrunching PlayCD...."
  797.              "\n\nPlease Wait!")
  798.  
  799.     ( if (NOT @pretend )
  800.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:PlayCD.lha" )
  801.         (
  802.         (abort "\n\nUnable to decrunch PlayCD!")
  803.         )
  804.     )))
  805.  
  806.  
  807.     (tooltype
  808.         (dest "CacheCDFS:PlayCD/PlayCD" )
  809.         (settooltype "DEVICE" #CDROM_Device )
  810.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  811.         (settooltype "BUFMEMTYPE" ("%ld" #BufMemInt ))
  812.     )
  813.     )
  814. )
  815.  
  816. (complete 80 )
  817.  
  818. (set #instJukebox 0)
  819.  
  820. (if (exists "CacheCDFSInst:JukeBox.lha")
  821. ((set #instJukebox
  822.     (askbool
  823.         (prompt "\n\nShould the JukeBox Audio Player be installed?")
  824.         (help "\n\nThis will copy over the JukeBox drawer "
  825.                 "to your CacheCDFS directory\n\nIf you do not "
  826.                 "wish the JukeBox drawer to be transferred to your system, "
  827.                 "skip this step." )
  828.         (default 1)
  829.     )
  830. )))
  831.  
  832. (if #instJukebox
  833.     (
  834.     (protect "CacheCDFS:JukeBox" "rwed" )
  835.     (protect "CacheCDFS:JukeBox.info" "rwed" )
  836.     (makedir "CacheCDFS:JukeBox" 
  837.         (infos)
  838.         (prompt "\n\nCreating drawer for JukeBox\n")
  839.         (help "\n\nThis will create a drawer for the JukeBox "
  840.                 "Audio Player." )
  841.     )
  842.  
  843.  
  844. (working "\n\nDecrunching Jukebox...."
  845.          "\n\nPlease Wait!")
  846.  
  847.     ( if (NOT @pretend )
  848.     (( if ( run "CacheCDFSInst:c/lhex -qafFw=CacheCDFS:Jukebox e CacheCDFSInst:JukeBox.lha" )
  849.         (
  850.         (makeassign "JukeBox")
  851.         (abort "\n\nUnable to decrunch JukeBox!")
  852.         )
  853.     )))
  854.  
  855.  
  856.     (tooltype
  857.         (dest "CacheCDFS:Jukebox/JukeBox" )
  858.         (settooltype "DEVICE" #CDROM_Device )
  859.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  860.     )
  861.  
  862. ))
  863.  
  864. (set #instYACDP 0)
  865.  
  866. (if (AND (AND (exists "CacheCDFSInst:YACDP.lha") (exists "CacheCDFSInst:LIBS/reqtools.library")) (= #DevFlags 0))
  867. ((set #instYACDP
  868.     (askbool
  869.         (prompt "\n\nShould the YACDP Audio Player be installed?")
  870.         (help "\n\nThis will copy over the YACDP drawer "
  871.                 "to your CacheCDFS directory\n\nIf you do not "
  872.                 "wish the YACDP drawer to be transferred to your system, "
  873.                 "skip this step." )
  874.         (default 1)
  875.     )
  876. )))
  877.  
  878. (if #instYACDP
  879.     (
  880.  
  881.     (protect "LIBS:reqtools.library" "rwed" )
  882.  
  883.     (copylib
  884.     (source "CacheCDFSInst:LIBS/reqtools.library")
  885.     (dest "LIBS:"))
  886.  
  887.     (working "\n\nDecrunching YACDP...."
  888.              "\n\nPlease Wait!")
  889.  
  890.     ( if (NOT @pretend )
  891.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:YACDP.lha" )
  892.         (
  893.         (abort "\n\nUnable to decrunch YACDP!")
  894.         )
  895.     )))
  896.  
  897.  
  898.     (tooltype
  899.         (dest "CacheCDFS:YACDP/YACDP" )
  900.         (settooltype "DEVICE" #CDROM_Device )
  901.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  902.     )
  903.     )
  904. )
  905.  
  906.  
  907. (if (AND (> #wbversion 38) (exists "CacheCDFSInst:CD32.lha"))
  908.  
  909.     ((complete 90 )
  910.  
  911.     (set #instCD32
  912.         (askbool
  913.             (prompt "\n\nShould the CD32-Emulator be installed?"
  914.                     "\n\nNote that the CD32-Emulator is completely useless "
  915.                     "if you don't have an Amiga with AA/AGA chipset and "
  916.                     "at least Kickstart version 3.0!")
  917.             (help "\n\nThis will copy over the CD32 drawer "
  918.                     "to your CacheCDFS directory\n\nIf you do not "
  919.                     "wish the CD32 drawer to be transferred to your system, "
  920.                     "skip this step.")
  921.             (default 1)
  922.         )
  923.     )
  924.  
  925.     (if #instCD32
  926.         (
  927.         (working "\n\nDecrunching CD32...."
  928.                  "\n\nPlease Wait!")
  929.  
  930.         ( if (NOT @pretend )
  931.         (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:CD32.lha" )
  932.             (
  933.             (abort "\n\nUnable to decrunch CD32!")
  934.             )
  935.         )))
  936.  
  937.     
  938.         (if (exists "CacheCDFSInst:CD32" )
  939.             ((copylib
  940.                 (prompt "This will copy the CD32 program.")
  941.                 (help "This will copy the CD32 program.")
  942.                 (source "CacheCDFSInst:CD32")
  943.                 (infos)
  944.                 (dest "CacheCDFS:CD32")
  945.                 (confirm)
  946.             ))
  947.         )
  948.  
  949.  
  950.         ( set #CDROM_Blocks 2 )
  951.  
  952.         (if (= #CDROM_Device "tandemcd.device")
  953.             (
  954.             ( set #CDROM_Blocks 4 )
  955.             )
  956.         )
  957.  
  958.         (if (= #CDROM_Device "tandemat.device")
  959.             (
  960.             ( set #CDROM_Blocks 4 )
  961.             )
  962.         )
  963.  
  964.         (if (= #CDROM_Device "tandemcd_pcmcia.device")
  965.             (
  966.             ( set #CDROM_Blocks 4 )
  967.             )
  968.         )
  969.  
  970.         (if (= #CDROM_Device "tandemcd_come.device")
  971.             (
  972.             ( set #CDROM_Blocks 4 )
  973.             )
  974.         )
  975.  
  976.         (tooltype
  977.             (dest "CacheCDFS:CD32/CD32" )
  978.             (settooltype "BLOCKS" ("%ld" #CDROM_Blocks ) )
  979.             (settooltype "DOSDEV" #CDDevice_NC)
  980.             )
  981.  
  982.         (set #instInst
  983.             (askbool
  984.             (prompt "\n\nShould the Installer utility be installed?"
  985.                     "\n\nNote that you only need to install the Installer "
  986.                     "utility if you don't have it already installed on "
  987.                     "your harddisk in your actual path!")
  988.             (help "\n\nThis will copy over the Installer utility "
  989.                     "to your CD32 directory\n\nIf you do not "
  990.                     "wish the Installer utility to be transferred to your system, "
  991.                     "skip this step." )
  992.             (default 1)
  993.             )
  994.         )
  995.  
  996.         (if #instInst
  997.             (
  998.             (copyfiles
  999.             (source "CacheCDFSInst:Installer")
  1000.             (dest "CacheCDFS:CD32")
  1001.             )
  1002.         )
  1003.         )
  1004.     ))
  1005. ))
  1006.  
  1007. (complete 100 )
  1008.  
  1009. (set #doMount
  1010.     (askbool
  1011.     (prompt "\n\nMount " #CDDevice " now ?")
  1012.     (help "Select, if " #CDDevice " should be mounted now, or not.")
  1013.     (default 1)
  1014.     )
  1015. )
  1016.  
  1017. (set #MountError 0)
  1018.  
  1019. ( if @pretend ((set #doMount 0))) 
  1020.  
  1021. (if #doMount
  1022.     (
  1023.     (run (cat "CacheCDFSInst:KillDev " #CDDevice " Quiet"))
  1024.     (if (< #wbversion 38)
  1025.         (
  1026.         (set #MountError
  1027.             (run (cat "C:Mount " #CDDevice " from devs:MountList." #CDDevice_NC ))
  1028.         )
  1029.         )
  1030.     )
  1031.  
  1032.     (if (> #wbversion 37)
  1033.         (
  1034.         (set #MountError
  1035.             (run (cat "C:Mount " #CDDevice  ))
  1036.         )
  1037.         )
  1038.     )
  1039.     )
  1040. )
  1041.  
  1042. (if #MountError
  1043.     (
  1044.     (message "\n\nMounting " #CDDevice " failed!")
  1045.     )
  1046. )
  1047.  
  1048. (makeassign "CacheCDFSInst" (safe))
  1049. (makeassign "CacheCDFS" (safe))
  1050.  
  1051.